<%--
  Created by IntelliJ IDEA.
  User: tangyubin
  Date: 15-3-4
  Time: 下午7:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>作品分配</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap-theme.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/admin.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
</head>
<body style="background: transparent">

	<div class="container">
		<div class="row">
			<form action="distributeWorks" method="post">
				<input type="submit" value="一键分配" class="btn btn-info"/>
			</form>
		</div>
		<div class="row">
			<table class="table table-bordered opacity">
	            <tr>
	                <th>作品ID</th>
	                <th>老师ID</th>
	                <th>分数</th>
	            </tr>
	        <s:iterator value="pageBean.list">
            	<tr>
                <td><s:property value="work.id"/></td>
                <td><s:property value="teacher.id"/></td>
                <td><s:property value="score"/></td>
            	</tr>
            </s:iterator>
	        </table>
	        <table>
        	<tr>  
                <td>  
                </td>  
                <td> 
                <s:if test="%{pageBean.currentPage == 1}">     
　　　　　　                              首页      上一页 
　　　　                                       </s:if>  
              	<s:else>  
               	<a href="getWorksDistributingPage.action?page=1"><button class="btn btn-info text-center pull-left">首页</button></a>  
             	<a href="getWorksDistributingPage.action?page=<s:property value="%{pageBean.currentPage-1}"/>"><button class="btn btn-info text-center pull-left">上一页</button></a>  
  				</s:else>  
                </td>  
                <td>  
                <s:if test="%{pageBean.currentPage != pageBean.totalPage && pageBean.totalPage != 0}">  
                <a  href="getWorksDistributingPage.action?page=<s:property value="%{pageBean.currentPage+1}"/>"><button class="btn btn-info text-center pull-left">下一页</button></a>  
                <a  href="getWorksDistributingPage.action?page=<s:property value="pageBean.totalPage"/>"><button class="btn btn-info text-center pull-left">尾页</button>  </a>  
                </s:if>  
               	<s:else>   
　　　　　　                             下一页  尾页   
　　　　                                      </s:else>  
                </td>  
  				<td>  
                <div align="center">  
                                                            页次  
                <s:property value="pageBean.currentPage" />/<s:property value="pageBean.totalPage" />  
                                                         共  <s:property value="pageBean.allRow" />记录  
                </div>  
                <div align="center"></div>  
                </td>  
             </tr>
        </table>  
		</div>
	</div>
</body>
</html>